import request from '@/api/myRequest'

function findUsersByPage(start, limit, data) {
  return request({
    url: `/admin/sysAuth/user/findUsersByPage/${start}/${limit}`,
    method: 'post',
    data
  })
}

// 获取用户明细
function user(id) {
  return request({
    url: `/admin/sysAuth/user/${id}`,
    method: 'get'
  })
}
// 新增用户
function saveUserRoles(data) {
  return request({
    url: '/admin/sysAuth/user/saveUserRoles',
    method: 'post',
    data
  })
}
// 更新用户
function updateUserRoles(data) {
  return request({
    url: '/admin/sysAuth/user/updateUserRoles',
    method: 'put',
    data
  })
}
// 删除管理用户
function removeUser(id) {
  return request({
    url: `/admin/sysAuth/user/removeUser/${id}`,
    method: 'delete'
  })
}
export { findUsersByPage, user, saveUserRoles, updateUserRoles, removeUser }
